#include <iostream>
#include <cstring>

using namespace std;

typedef struct Books
{
    char title[50];
    char author[50];
    char subject[100];
    int book_id;
}koukou;

void printBook(koukou *book);

int main()
{
    koukou b1;
    strcpy(b1.title, "kk 教程");
    strcpy(b1.author, "kk 教程");
    strcpy(b1.subject, "kk 教程");
    //  为啥不能这样赋值
    // b1.title = "kk 教程";
    // b1.author = "kk 教程";
    // b1.subject = "kk 教程";
    b1.book_id = 123;
    printBook(&b1);

    cout <<"==============================="<< endl;

    char str[50] = "hello";
    cout << "str is " << str << endl;
    return 0;

}

void printBook(koukou *book)
{
   cout << "书标题  : " << book->title <<endl;
   cout << "书作者 : " << book->author <<endl;
   cout << "书类目 : " << book->subject <<endl;
   cout << "书 ID : " << book->book_id <<endl;
}